//
// Created by Amon on 2021/10/16.
//

#ifndef AMONPLAYER_CRASHDEFINE_H
#define AMONPLAYER_CRASHDEFINE_H

#include <android/log.h>
#include <signal.h>

#define TAG "CRASH_JNI_TAG"

#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__)
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__)

const int EXCEPTION_SIGNALS[] = {SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS, SIGTRAP};
const int EXCEPTION_SIGNALS_NUMBER = sizeof(EXCEPTION_SIGNALS) / sizeof(EXCEPTION_SIGNALS[0]);

#define BACKTRACK_FRAMES_MAX 200

#endif //AMONPLAYER_CRASHDEFINE_H
